package com.smfx.yxt.view;

import java.util.List;

import com.smfx.yxt.model.AttachmentList;
import com.smfx.yxt.model.PrincipalMailbox;
import com.smfx.yxt.utils.DateUtil;

public class PrincipalMailboxView extends PrincipalMailbox {

	private static final long serialVersionUID = -5181595008909414968L;

	private String parentName;
	
	private String headImgUrl;
	
	private String teacherHeadImgUrl;
	
	private String studentName;
	
	private Integer studyType;
	
	private Integer grade;
	
	private Integer clazz;
	

	private List<AttachmentList> attachList;
	
	
	public String getReplyStatus() {
		if(getIsReply() == 1)
			return "已回复";
		else
			return "未回复";
	}
	public String getCreateTimeText() {
		if(getCreateTime() != null)
			return DateUtil.getStrFromDate(DateUtil.DEFAULT_DATE_FORMAT2, getCreateTime());
		else
			return "";
	}
	public String getReplyTimeText() {
		if(getReplyTime() != null)
			return DateUtil.getStrFromDate(DateUtil.DEFAULT_DATE_FORMAT2, getReplyTime());
		else
			return "";
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	public String getHeadImgUrl() {
		return headImgUrl;
	}

	public void setHeadImgUrl(String headImgUrl) {
		this.headImgUrl = headImgUrl;
	}

	public String getTeacherHeadImgUrl() {
		return teacherHeadImgUrl;
	}

	public void setTeacherHeadImgUrl(String teacherHeadImgUrl) {
		this.teacherHeadImgUrl = teacherHeadImgUrl;
	}

	public List<AttachmentList> getAttachList() {
		return attachList;
	}

	public void setAttachList(List<AttachmentList> attachList) {
		this.attachList = attachList;
	}

	public String getStudentName() {
		return studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	public Integer getStudyType() {
		return studyType;
	}
	public void setStudyType(Integer studyType) {
		this.studyType = studyType;
	}
	public Integer getGrade() {
		return grade;
	}

	public void setGrade(Integer grade) {
		this.grade = grade;
	}

	public Integer getClazz() {
		return clazz;
	}

	public void setClazz(Integer clazz) {
		this.clazz = clazz;
	}
	
	public String getGradeName(){
		return TermView.getGradeName(this.grade, this.studyType);
	}
}
